home *** CD-ROM | disk | FTP | other *** search
- Path: news.PBI.net!usenet
- From: mich@pbinet.com
- Newsgroups: comp.lang.c
- Subject: Re: Arrays of strings
- Date: 29 Feb 1996 05:00:15 GMT
- Organization: Pacific Bell Internet Services
- Message-ID: <4h3bsv$s24@SNFC21_SRVR_WWW.PBI.net>
- References: <4g3625$f0m@jaxnet.jaxnet.com>
- Reply-To: mich@pbinet.com
- NNTP-Posting-Host: ppp-5-39.rdcy01.pbinet.com
- X-Newsreader: IBM NewsReader/2 v1.03
-
- >Larry DiGiovanni (ldigiova@nova.umuc.edu) wrote:
-
- >: I'm trying to read lines of a text file and load those lines into an
- >: array. I have a couple of questions...
- >: 1. How do I declare the array to contain the text. When it is declared,
- >: I will not know how many lines are in the text file. char **txtarray?
-
- >Yes, that can work. "char **txtarray;" now is an uninitialized pointer
- >of pointers to character arrays <I hope I stated that correctly>.
-
- Just as a point of note; I have successfully used both a pointer to a large
- (pre-malloced, of course) buffer of type char and an array of pointers to
- lesser sized char buffers to achieve this. Standard C stuff, really. Arrays
- of pointers to buffers seem to work well for word processing type
- applications.
-
-